package val.to.entities;

import org.json.JSONException;
import org.json.JSONObject;


/**
 * Represent a photo post send from the client to valto server.
 */
public class PhotoPost {
	
	private String m_photoUri;
	private String m_thumbnailUri;
	private String m_samallPhotoUri;
	private String m_comment;
	private boolean m_sharedOnFB;
	
	public PhotoPost(String photoUri, String smallPhotoUri, String thumbnailUri, String comment, boolean sharedOnFB){
		m_photoUri = photoUri;
		m_thumbnailUri = thumbnailUri;
		m_comment = comment;
		m_samallPhotoUri = smallPhotoUri;
		m_sharedOnFB = sharedOnFB;
	}	
	
	public String getPhotoUri(){
		return m_photoUri;
	}

	public String getThumbnailUri(){
		return m_thumbnailUri;
	}
	
	public String getSmallPhotoUri(){
		return m_samallPhotoUri;
	}
	
	public String getComment(){
		return m_comment;
	}
	
	public boolean getIsSharedOnFB(){
		return m_sharedOnFB;
	}
	
	public JSONObject json() throws JSONException{
		JSONObject json = new JSONObject();
		json.put("comment", m_comment);
		json.put("photo", m_photoUri);
		json.put("smallPhoto", m_samallPhotoUri);
		json.put("thumbnail", m_thumbnailUri);
		json.put("uploadedToFB", m_sharedOnFB);
		return json;
	}
}
